import request from "../utils"

export let addorder = (userid: any) => {
    return request({
        url: "/api/order/addOrder",
        method: "POST",
        data: {
            userid
        }
    })
}

export let updateOrderAddress = (paylod={}) => {
    return request({
        url: "/api/order/updateOrderAddress",
        method: "POST",
        data: paylod
    })
}

export let orderlist = (userid:any) => {
    return request({
        url: "/api/user/orderlist",
        method: "POST",
        data: {
            userid
        }
    })
}

export let confirmOrder = (userid:any,time:any) => {
    return request({
        url: "/api/order/confirmOrder",
        method: "GET",
        params: {
            userid,time
        }
    })
}

export let deleteCartItem = (userid:any) => {
    return request({
        url: "/api/order/deleteCartItem",
        method: "GET",
        params: {
            userid
        }
    })
}